/**
 * Generate time : 2012-01-13 13:58:43
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEFaultRecord table comment : 设备故障记录
 */
public class ZMCEFaultRecord extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEquipmentId = " "; /* 设备卡片ID */
	private String fdProductionUnitsId = " "; /* 生产单元ID */
	private String fdFaultreFlag = " "; /* 故障来源 */
	private String fdCode = " "; /* 故障记录编号 */
	private String fdBeginClock = " "; /* 开始时刻 */
	private String fdEndClock = " "; /* 结束时刻 */
	private String fdDescription = " "; /* 故障描述 */
	private String fdPracticalProblem = " "; /* 实际故障 */
	private String fdFaultreason = " "; /* 故障原因 */
	private String fdTreatmentMeasure = " "; /* 处理措施 */
	private String fdStatus = " "; /* 处理状态 */
	private String fdProcessDepartment = " "; /* 处理部门 */
	private String fdProcessPerson = " "; /* 处理人 */
	private String fdFaultType = " ";
	private String fdRecorder = " ";
	private String fdRecordDeptId = " ";
	private String fdType = " "; /* 类型 */

	private String fdEquipmentCode = " "; /* 设备编号 */
	private String fdEquipmentName = " "; /* 设备名称 */
	private String fdEquipmentDepartment = " "; /* 使用部门 */
	private String fdEquipmentEngineering = " "; /* 使用工程 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("设备卡片ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitsId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产单元ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultreFlag");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("故障来源");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("故障记录编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBeginClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("开始时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEndClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("结束时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDescription");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("故障描述");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdPracticalProblem");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("实际故障");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultreason");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("故障原因");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdTreatmentMeasure");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("处理措施");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("处理状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProcessDepartment");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("处理部门");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProcessPerson");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("处理人");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFaultType");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRecorder");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRecordDeptId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName(" ");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("设备编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("设备名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentDepartment");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("使用部门");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentEngineering");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("FD_ENGINEERING");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdType");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("类型");
		eiMetadata.addMeta(eiColumn);


	}

	/**
	 * the constructor
	 */
	public ZMCEFaultRecord() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEquipmentId - 设备卡片ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 设备卡片ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdProductionUnitsId - 生产单元ID
	 * 
	 * @return the fdProductionUnitsId
	 */
	public String getFdProductionUnitsId() {
		return this.fdProductionUnitsId;
	}

	/**
	 * set the fdProductionUnitsId - 生产单元ID
	 */
	public void setFdProductionUnitsId(String fdProductionUnitsId) {
		this.fdProductionUnitsId = fdProductionUnitsId;
	}

	/**
	 * get the fdFaultreFlag - 故障来源
	 * 
	 * @return the fdFaultreFlag
	 */
	public String getFdFaultreFlag() {
		return this.fdFaultreFlag;
	}

	/**
	 * set the fdFaultreFlag - 故障来源
	 */
	public void setFdFaultreFlag(String fdFaultreFlag) {
		this.fdFaultreFlag = fdFaultreFlag;
	}

	/**
	 * get the fdCode - 故障记录编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 故障记录编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdBeginClock - 开始时刻
	 * 
	 * @return the fdBeginClock
	 */
	public String getFdBeginClock() {
		return this.fdBeginClock;
	}

	/**
	 * set the fdBeginClock - 开始时刻
	 */
	public void setFdBeginClock(String fdBeginClock) {
		this.fdBeginClock = fdBeginClock;
	}

	/**
	 * get the fdEndClock - 结束时刻
	 * 
	 * @return the fdEndClock
	 */
	public String getFdEndClock() {
		return this.fdEndClock;
	}

	/**
	 * set the fdEndClock - 结束时刻
	 */
	public void setFdEndClock(String fdEndClock) {
		this.fdEndClock = fdEndClock;
	}

	/**
	 * get the fdDescription - 故障描述
	 * 
	 * @return the fdDescription
	 */
	public String getFdDescription() {
		return this.fdDescription;
	}

	/**
	 * set the fdDescription - 故障描述
	 */
	public void setFdDescription(String fdDescription) {
		this.fdDescription = fdDescription;
	}

	/**
	 * get the fdPracticalProblem - 实际故障
	 * 
	 * @return the fdPracticalProblem
	 */
	public String getFdPracticalProblem() {
		return this.fdPracticalProblem;
	}

	/**
	 * set the fdPracticalProblem - 实际故障
	 */
	public void setFdPracticalProblem(String fdPracticalProblem) {
		this.fdPracticalProblem = fdPracticalProblem;
	}

	/**
	 * get the fdFaultreason - 故障原因
	 * 
	 * @return the fdFaultreason
	 */
	public String getFdFaultreason() {
		return this.fdFaultreason;
	}

	/**
	 * set the fdFaultreason - 故障原因
	 */
	public void setFdFaultreason(String fdFaultreason) {
		this.fdFaultreason = fdFaultreason;
	}

	/**
	 * get the fdTreatmentMeasure - 处理措施
	 * 
	 * @return the fdTreatmentMeasure
	 */
	public String getFdTreatmentMeasure() {
		return this.fdTreatmentMeasure;
	}

	/**
	 * set the fdTreatmentMeasure - 处理措施
	 */
	public void setFdTreatmentMeasure(String fdTreatmentMeasure) {
		this.fdTreatmentMeasure = fdTreatmentMeasure;
	}

	/**
	 * get the fdStatus - 处理状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 处理状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * get the fdProcessDepartment - 处理部门
	 * 
	 * @return the fdProcessDepartment
	 */
	public String getfdProcessDepartment() {
		return this.fdProcessDepartment;
	}

	/**
	 * set the fdProcessDepartment - 处理部门
	 */
	public void setfdProcessDepartment(String fdProcessDepartment) {
		this.fdProcessDepartment = fdProcessDepartment;
	}

	/**
	 * get the fdProcessPerson - 处理人
	 * 
	 * @return the fdProcessPerson
	 */
	public String getFdProcessPerson() {
		return this.fdProcessPerson;
	}

	/**
	 * set the fdProcessPerson - 处理人
	 */
	public void setFdProcessPerson(String fdProcessPerson) {
		this.fdProcessPerson = fdProcessPerson;
	}

	/**
	 * get the fdFaultType
	 * 
	 * @return the fdFaultType
	 */
	public String getFdFaultType() {
		return this.fdFaultType;
	}

	/**
	 * set the fdFaultType
	 */
	public void setFdFaultType(String fdFaultType) {
		this.fdFaultType = fdFaultType;
	}

	/**
	 * get the fdRecorder
	 * 
	 * @return the fdRecorder
	 */
	public String getFdRecorder() {
		return this.fdRecorder;
	}

	/**
	 * set the fdRecorder
	 */
	public void setFdRecorder(String fdRecorder) {
		this.fdRecorder = fdRecorder;
	}

	/**
	 * get the fdRecordDeptId
	 * 
	 * @return the fdRecordDeptId
	 */
	public String getfdRecordDeptId() {
		return this.fdRecordDeptId;
	}

	/**
	 * set the fdRecordDeptId
	 */
	public void setfdRecordDeptId(String fdRecordDeptId) {
		this.fdRecordDeptId = fdRecordDeptId;
	}

	/**
	 * @return the fdEquipmentCode
	 */
	public String getFdEquipmentCode() {
		return fdEquipmentCode;
	}

	/**
	 * @param fdEquipmentCode
	 *            the fdEquipmentCode to set
	 */
	public void setFdEquipmentCode(String fdEquipmentCode) {
		this.fdEquipmentCode = fdEquipmentCode;
	}

	/**
	 * @return the fdEquipmentName
	 */
	public String getFdEquipmentName() {
		return fdEquipmentName;
	}

	/**
	 * @param fdEquipmentName
	 *            the fdEquipmentName to set
	 */
	public void setFdEquipmentName(String fdEquipmentName) {
		this.fdEquipmentName = fdEquipmentName;
	}

	/**
	 * @return the fdEquipmentDepartment
	 */
	public String getFdEquipmentDepartment() {
		return fdEquipmentDepartment;
	}

	/**
	 * @param fdEquipmentDepartment
	 *            the fdEquipmentDepartment to set
	 */
	public void setFdEquipmentDepartment(String fdEquipmentDepartment) {
		this.fdEquipmentDepartment = fdEquipmentDepartment;
	}

	/**
	 * @return the fdEquipmentEngineering
	 */
	public String getFdEquipmentEngineering() {
		return fdEquipmentEngineering;
	}

	/**
	 * @param fdEquipmentEngineering
	 *            the fdEquipmentEngineering to set
	 */
	public void setFdEquipmentEngineering(String fdEquipmentEngineering) {
		this.fdEquipmentEngineering = fdEquipmentEngineering;
	}
	
	/**
	 * get the fdStatus - 类型
	 * 
	 * @return the fdStatus
	 */
	public String getFdType() {
		return this.fdType;
	}

	/**
	 * set the FdType - 类型
	 */
	public void setFdType(String fdType) {
		this.fdType = fdType;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdProductionUnitsId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitsId")), fdProductionUnitsId));
		setFdFaultreFlag(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultreFlag")), fdFaultreFlag));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdBeginClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBeginClock")), fdBeginClock));
		setFdEndClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEndClock")), fdEndClock));
		setFdDescription(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDescription")), fdDescription));
		setFdPracticalProblem(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdPracticalProblem")), fdPracticalProblem));
		setFdFaultreason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultreason")), fdFaultreason));
		setFdTreatmentMeasure(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdTreatmentMeasure")), fdTreatmentMeasure));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setfdProcessDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProcessDepartment")), fdProcessDepartment));
		setFdProcessPerson(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProcessPerson")), fdProcessPerson));
		setFdFaultType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFaultType")), fdFaultType));
		setFdRecorder(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRecorder")), fdRecorder));
		setfdRecordDeptId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRecordDeptId")), fdRecordDeptId));

		setFdEquipmentCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentCode")), fdEquipmentCode));
		setFdEquipmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentName")), fdEquipmentName));
		setFdEquipmentDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentDepartment")), fdEquipmentDepartment));
		setFdEquipmentEngineering(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentEngineering")), fdEquipmentEngineering));
		setFdType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdType")), fdType));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdProductionUnitsId", StringUtils.toString(fdProductionUnitsId, eiMetadata.getMeta("fdProductionUnitsId")));
		map.put("fdFaultreFlag", StringUtils.toString(fdFaultreFlag, eiMetadata.getMeta("fdFaultreFlag")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdBeginClock", StringUtils.toString(fdBeginClock, eiMetadata.getMeta("fdBeginClock")));
		map.put("fdEndClock", StringUtils.toString(fdEndClock, eiMetadata.getMeta("fdEndClock")));
		map.put("fdDescription", StringUtils.toString(fdDescription, eiMetadata.getMeta("fdDescription")));
		map.put("fdPracticalProblem", StringUtils.toString(fdPracticalProblem, eiMetadata.getMeta("fdPracticalProblem")));
		map.put("fdFaultreason", StringUtils.toString(fdFaultreason, eiMetadata.getMeta("fdFaultreason")));
		map.put("fdTreatmentMeasure", StringUtils.toString(fdTreatmentMeasure, eiMetadata.getMeta("fdTreatmentMeasure")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdProcessDepartment", StringUtils.toString(fdProcessDepartment, eiMetadata.getMeta("fdProcessDepartment")));
		map.put("fdProcessPerson", StringUtils.toString(fdProcessPerson, eiMetadata.getMeta("fdProcessPerson")));
		map.put("fdFaultType", StringUtils.toString(fdFaultType, eiMetadata.getMeta("fdFaultType")));
		map.put("fdRecorder", StringUtils.toString(fdRecorder, eiMetadata.getMeta("fdRecorder")));
		map.put("fdRecordDeptId", StringUtils.toString(fdRecordDeptId, eiMetadata.getMeta("fdRecordDeptId")));

		map.put("fdEquipmentCode", StringUtils.toString(fdEquipmentCode, eiMetadata.getMeta("fdEquipmentCode")));
		map.put("fdEquipmentName", StringUtils.toString(fdEquipmentName, eiMetadata.getMeta("fdEquipmentName")));
		map.put("fdEquipmentDepartment", StringUtils.toString(fdEquipmentDepartment, eiMetadata.getMeta("fdEquipmentDepartment")));
		map.put("fdEquipmentEngineering", StringUtils.toString(fdEquipmentEngineering, eiMetadata.getMeta("fdEquipmentEngineering")));
		map.put("fdType", StringUtils.toString(fdType, eiMetadata.getMeta("fdType")));

		return map;

	}
}